<template>
  <div class="goods">
    <p>商品名称:{{ pname }}</p>
    <p>单价:{{ price }}</p>
    <p>商品介绍:{{ info }}</p>
    <button @click="$emit('kanyidao', id)">砍一刀</button>
  </div>
</template>

<script>
export default {
  props: {
    id: {
      require: true,
      type: Number,
    },
    pname: {
      default: "干吃面",
    },
    price: Number,
    info: {
      default: "脆脆的",
    },
  },
};
</script>


<style>
.goods {
  padding: 10px;
  margin: 8px;
  background-color: pink;
  height: 100px;
}
</style>